package com.dayaokeji.rhythmschoolstudent.databases.model;

import android.text.TextUtils;

import com.litesuits.orm.db.annotation.Column;
import com.litesuits.orm.db.annotation.NotNull;
import com.litesuits.orm.db.annotation.PrimaryKey;
import com.litesuits.orm.db.annotation.Table;
import com.litesuits.orm.db.enums.AssignType;

/**
 * Created by Gorden on 2017/9/27.
 */

@Table("user")
public class UserInfoModel {

    public static final String USER_ID = "user_id";
    public static final String AVATAR_URL = "avatar_url";
    public static final String NAME = "name";
    public static final String EASE_USER_NAME = "ease_user_name";


    @PrimaryKey(AssignType.AUTO_INCREMENT)
    private int id;

    @Column(USER_ID)
    private String userId;

    @NotNull
    @Column(NAME)
    private String name;

    @Column(AVATAR_URL)
    private String avatarUrl;

    @Column(EASE_USER_NAME)
    private String easeUserName;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatarUrl() {
        return TextUtils.isEmpty(avatarUrl) ? "" : avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getEaseUserName() {
        return easeUserName;
    }

    public void setEaseUserName(String easeUserName) {
        this.easeUserName = easeUserName;
    }
}
